package com.zzl.ov_library.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName recommendation
 */
@TableName(value ="recommendation")
@Data
public class Recommendation implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "book_title")
    private String bookTitle;

    /**
     * 
     */
    @TableField(value = "author")
    private String author;

    /**
     * 
     */
    @TableField(value = "isbn")
    private String isbn;

    /**
     * 
     */
    @TableField(value = "book_press")
    private String bookPress;

    /**
     * 
     */
    @TableField(value = "press_time")
    private String pressTime;

    /**
     * 
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 
     */
    @TableField(value = "email")
    private String email;

    /**
     * 推荐理由
     */
    @TableField(value = "reason")
    private String reason;

    /**
     * 
     */
    @TableField(value = "cover")
    private String cover;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Recommendation other = (Recommendation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBookTitle() == null ? other.getBookTitle() == null : this.getBookTitle().equals(other.getBookTitle()))
            && (this.getAuthor() == null ? other.getAuthor() == null : this.getAuthor().equals(other.getAuthor()))
            && (this.getIsbn() == null ? other.getIsbn() == null : this.getIsbn().equals(other.getIsbn()))
            && (this.getBookPress() == null ? other.getBookPress() == null : this.getBookPress().equals(other.getBookPress()))
            && (this.getPressTime() == null ? other.getPressTime() == null : this.getPressTime().equals(other.getPressTime()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
            && (this.getCover() == null ? other.getCover() == null : this.getCover().equals(other.getCover()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBookTitle() == null) ? 0 : getBookTitle().hashCode());
        result = prime * result + ((getAuthor() == null) ? 0 : getAuthor().hashCode());
        result = prime * result + ((getIsbn() == null) ? 0 : getIsbn().hashCode());
        result = prime * result + ((getBookPress() == null) ? 0 : getBookPress().hashCode());
        result = prime * result + ((getPressTime() == null) ? 0 : getPressTime().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
        result = prime * result + ((getCover() == null) ? 0 : getCover().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", bookTitle=").append(bookTitle);
        sb.append(", author=").append(author);
        sb.append(", isbn=").append(isbn);
        sb.append(", bookPress=").append(bookPress);
        sb.append(", pressTime=").append(pressTime);
        sb.append(", phone=").append(phone);
        sb.append(", email=").append(email);
        sb.append(", reason=").append(reason);
        sb.append(", cover=").append(cover);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}